
var main = {};
main.layout = null;
$(function(){
	main.layout = $("#layout");
	//main.init();
     $(window).resize(function(){ //浏览器窗口变更 
    	 main.layout.layout('resize');
     });
});
main.init = function(){
	var options = {};
	options.fit = true;
	options.border = false;
	main.layout.layout(options);
	main.addNorthLayout();
	main.addSouthLayout();
	main.addEastLayout();
	main.addWestLayout();
	main.addCenterLayout();
};
main.addLayout = function(options){
	main.layout.layout("add",options);
};
main.addWestLayout = function(){
	var options = {}; 
	options.region = 'west'; 
	options.width =  180; 
	options.title =  'West Title'; 
	options.split =  true;  
	main.addLayout(options);
};
main.addNorthLayout = function(){
	var options = {}; 
	options.region = 'north'; 
	options.height =  50; 
	options.title =  'north Title'; 
	options.split =  true;  
	main.addLayout(options);
};
main.addSouthLayout = function(){
	var options = {}; 
	options.region = 'south'; 
	options.height =  50; 
	options.title =  'south Title'; 
	options.split =  true;  
	main.addLayout(options);
};
main.addEastLayout = function(){
	var options = {}; 
	options.region = 'East'; 
	options.width =  180; 
	options.title =  'East Title'; 
	options.split =  true;  
	main.addLayout(options);
};
main.addCenterLayout = function(){
	var options = {}; 
	options.region = 'center';  
	main.addLayout(options);
};